<?php

require_once './include/common.inc.php';
require_once 'left.php';
require_once 'right.php';

$page_title = 'Acuity World WebShop';
$menu_id = 0;
$menu_str = PrintMenu();
//$tdNum = 4;
$showPicWidth=200;
$showPicHeight=50;

$promoter_menu_id = 5;
$promoter_menu_str = PrintPromoterMenu();

if (isPromoterLogin()) {
    $sql = "SELECT * FROM  `promoter_info` WHERE  `id` = '$promoter_uid'";
    $promoter_info_ary = $db->get_one($sql);
} else {
    header("LOCATION:promoter_login.php");
    exit;
}

$sql="select * from `med_banner` order by order_index";
$ary_banner=$mysql->fetch($sql);
$trNum = count($ary_banner);

for($i=0;$i<$trNum;$i++)
{
	if($ary_banner[$i]["id"]!="")
	{
		$pic_url="pictures/promotion/".$ary_banner[$i]["picurl"];
		if(trim($ary_banner[$i]["picurl"])!="" && file_exists($pic_url))
		{
			$ary_banner[$i]["pic"]=getOutPut($ary_banner[$i]["picurl"],$ary_banner[$i]["width"],$ary_banner[$i]["height"],"pictures/promotion/");
			$ary_banner[$i]["radioBox"]="<input type=\"radio\" name=\"selBanner\" class=\"radio\" value=\"".$ary_banner[$i]["id"]."\" onClick=\"genHTMLcode('".$ary_banner[$i]["picurl"]."',".$ary_banner[$i]["width"].",".$ary_banner[$i]["height"].",".$promoter_uid.",'');\"/>".$ary_banner[$i]["width"]." * ".$ary_banner[$i]["height"]." pix";
		}
		$pic_url_d="pictures/promotion/".$ary_banner[$i]["picurl_danish"];
		if(trim($ary_banner[$i]["picurl_danish"])!="" && file_exists($pic_url_d))
		{
			$ary_banner[$i]["pic_d"]=getOutPut($ary_banner[$i]["picurl_danish"],$ary_banner[$i]["width"],$ary_banner[$i]["height"],"pictures/promotion/");
			$ary_banner[$i]["radioBox_d"]="<input type=\"radio\" name=\"selBanner\" class=\"radio\" value=\"".$ary_banner[$i]["id"]."\" onClick=\"genHTMLcode('".$ary_banner[$i]["picurl_danish"]."',".$ary_banner[$i]["width"].",".$ary_banner[$i]["height"].",".$promoter_uid.",'da');\"/>".$ary_banner[$i]["width"]." * ".$ary_banner[$i]["height"]." pix";
		}
	}
}

require_once PrintEot('header');
require_once PrintEot('left');
require_once PrintEot('promoter_promotionBanner');
require_once PrintEot('right');
require_once PrintEot('footer');
?>
